st = input("请输入一段字符")
st1 = 0
num = 0
blank = 0
other = 0
length = len(st)
for i in range(length):
    if st[i].isalpha():
        st1 += 1
    elif st[i].isdigit():
        num += 1
    elif st[i].isspace():
        blank += 1
    else:
        other += 1

print("字母个数:", st1)
print("数字个数:", num)
print("空格个数:", blank)
print("其他字符个数:", other)
